/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.asistente.entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Wizard
 */
@Embeddable
public class HdDetalleTicketPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "COD_TICKET")
    private int codTicket;
    @Basic(optional = false)
    @NotNull
    @Column(name = "COD_DET_TICKET")
    private int codDetTicket;

    public HdDetalleTicketPK() {
    }

    public HdDetalleTicketPK(int codTicket, int codDetTicket) {
        this.codTicket = codTicket;
        this.codDetTicket = codDetTicket;
    }

    public int getCodTicket() {
        return codTicket;
    }

    public void setCodTicket(int codTicket) {
        this.codTicket = codTicket;
    }

    public int getCodDetTicket() {
        return codDetTicket;
    }

    public void setCodDetTicket(int codDetTicket) {
        this.codDetTicket = codDetTicket;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) codTicket;
        hash += (int) codDetTicket;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof HdDetalleTicketPK)) {
            return false;
        }
        HdDetalleTicketPK other = (HdDetalleTicketPK) object;
        if (this.codTicket != other.codTicket) {
            return false;
        }
        if (this.codDetTicket != other.codDetTicket) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.asistente.DAO.HdDetalleTicketPK[ codTicket=" + codTicket + ", codDetTicket=" + codDetTicket + " ]";
    }
    
}
